import "./Clock.scss";

export default function Clock(props) {
  const { styleOpt, time, text, handleText } = props;

  return (
    <div
      class="clock"
      style={{ background: styleOpt.clockColor }}
      onMouseEnter={() => handleText(text)}
      onMouseLeave={() => handleText("")}
    >
      {time.hour}
      <span>:</span>
      {time.mintue}
    </div>
  );
}
